package com.yonyou.cyxdms.sysAuth.service.mapper;

import com.yonyou.cyx.framework.dao.base.SuperMapper;
import com.yonyou.cyxdms.sysAuth.service.entity.OrgRolePO;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 职位与角色关系 Mapper 接口
 * </p>
 *
 * @author 李贺
 * @since 2019-09-18
 */
public interface OrgRoleMapper extends SuperMapper<OrgRolePO> {

    @Delete("delete from tr_org_role where user_org_id=#{userOrgId}")
    void deleteByUserOrgId(@Param("userOrgId") Long userOrgId);
    @Select("select ROLE_ID from tr_org_role where user_org_id=#{userOrgId}")
    List<Long> getRoleIdsByUserOrgId(@Param("userOrgId") Long userOrgId);
}
